//
//  XZSelectedView.m
//  优学荟管理系统
//
//  Created by edz on 2018/1/10.
//  Copyright © 2018年 星道三好. All rights reserved.
//

#import "XZSelectedView.h"

@implementation XZSelectedView {
   __weak IBOutlet UIButton *defultBtn;
   __weak IBOutlet UIButton *elementsBtn;
    
}


- (instancetype)initview {
//    self.alpha = 0.7;
    return [[[NSBundle mainBundle] loadNibNamed:@"XZSelectedView" owner:nil options:nil]lastObject];
}

#pragma mark- 销毁视图
- (IBAction)disMissView:(id)sender {
    [self removeFromSuperview];
    
}
#pragma mark- 选择回调
- (IBAction)selectSorting:(id)sender {
    if (_callBack) {
        _callBack(defultBtn.selected == YES ? @"0" : @"1");
        [self removeFromSuperview];
    }
}
#pragma mark- 默认排序
- (IBAction)defultSorting:(id)sender {
    elementsBtn.selected = NO;
    defultBtn.selected = YES;
}
#pragma mark- 要素排序
- (IBAction)elementSorting:(id)sender {
    elementsBtn.selected = YES;
    defultBtn.selected = NO;
}


@end
